import java.text.DecimalFormat;
import java.util.Scanner;

/**
 * @author Administrator
 *
 */
public class Task2_3 {
    public static void main(String[] args) {
        System.out.println("请输入身高(cm)：");
        Scanner sc1 = new Scanner(System.in);
        double height = sc1.nextInt();
        System.out.println("请输入体重(kg)：");
        Scanner sc2 = new Scanner(System.in);
        double weight = sc2.nextInt();
        double miheight=height/100;
        double bmi=weight/(miheight*miheight);
        if(bmi<18.5){
            System.out.println("您的体质指数为："+String.format("%.2f", bmi)+",过轻");
        }else if(bmi>=18.5&&bmi<=23.9){
            System.out.println("您的体质指数为："+String.format("%.2f", bmi)+",正常");
        }else if(bmi>=24&&bmi<=27){
            System.out.println("您的体质指数为："+String.format("%.2f", bmi)+",过重");
        }else if(bmi>=28&&bmi<=32){
            System.out.println("您的体质指数为："+String.format("%.2f", bmi)+",肥胖");
        }else if(bmi>32){
            System.out.println("您的体质指数为："+String.format("%.2f", bmi)+",非常肥胖");
        }

    }
}
